package com.macro.mall.param;

import cn.bestsign.delta.commons2.validate.annotation.Mobile;
import com.macro.mall.model.UmsCommunityAgent;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ToString
public class UpdateCommunityAgentParam {

    @ApiModelProperty(value = "微信账号")
    @NotEmpty(message = "微信账号不能为空")
    private String wechatAccount;

    @ApiModelProperty(value = "真实姓名")
    @NotEmpty(message = "真实姓名不能为空")
    private String name;

    @ApiModelProperty(value = "昵称")
    private String nickname;

    @ApiModelProperty(value = "手机号码")
    @Mobile(message = "请输入正确的手机号")
    private String phone;

    @ApiModelProperty(value = "头像")
    private String icon;

    @ApiModelProperty(value = "性别：0->未知；1->男；2->女")
    @Range(min = 0,max = 2,message = "请输入正确的性别")
    private Integer gender;

    @ApiModelProperty(value = "生日")
    private Date birthday;

    @ApiModelProperty(value = "所在城市")
    private String city;

    @ApiModelProperty(value = "职业")
    private String job;

    @ApiModelProperty(value = "个性签名")
    private String personalizedSignature;

    @ApiModelProperty(value = "所在位置")
    @NotEmpty(message = "所在位置不能为空")
    private String location;

    @ApiModelProperty(value = "经度")
    @NotNull(message = "请您重新定位")
    private Double longitude;

    @ApiModelProperty(value = "纬度")
    @NotNull(message = "请您重新定位")
    private Double latitude;

    @ApiModelProperty(value = "用户来源")
    private Integer sourceType;

    @ApiModelProperty(value = "注册时间")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;


    public static UmsCommunityAgent toEntity(){
        return UmsCommunityAgent.builder()

                .build();
    }
}
